Highlight top-level augmented assignments in Python (Bug#6445).
authorChong Yidong <cyd@stupidchicken.com>
Sun, 21 Nov 2010 17:12:44 +0000 (12:12 -0500)
committerChong Yidong <cyd@stupidchicken.com>
Sun, 21 Nov 2010 17:12:44 +0000 (12:12 -0500)
* progmodes/python.el (python-font-lock-keywords): Highlight
top-level augmented assignments (Bug#6445).

lisp/ChangeLog
lisp/progmodes/python.el

index feb8d07a951d93b4ebb440e101dadcc3d0c5d1ac..7aefe8d923ab53af2052f496dd53a5df04631b3f 100644 (file)
@@ -1,3 +1,8 @@
+2010-11-21  Deniz Dogan  <deniz.a.m.dogan@gmail.com>
+
+       * progmodes/python.el (python-font-lock-keywords): Highlight
+       top-level augmented assignments (Bug#6445).
+
 2010-11-21  Jan Djärv  <jan.h.d@swipnet.se>
 
        * term/ns-win.el (ns-right-control-modifier)
index 7754dc6c87cdf0ea18277b27761b04d2bf7f7da9..9fe57beec300ea1de52395fafbcf48eb77093597 100644 (file)
     (,(rx symbol-start (group "def") (1+ space) (group (1+ (or word ?_))))
      (1 font-lock-keyword-face) (2 font-lock-function-name-face))
     ;; Top-level assignments are worth highlighting.
-    (,(rx line-start (group (1+ (or word ?_))) (0+ space) "=")
+    (,(rx line-start (group (1+ (or word ?_))) (0+ space)
+         (opt (or "+" "-" "*" "**" "/" "//" "&" "%" "|" "^" "<<" ">>")) "=")
      (1 font-lock-variable-name-face))
     ;; Decorators.
     (,(rx line-start (* (any " \t")) (group "@" (1+ (or word ?_))